home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d13
/
qscrt121.arc
/
SCRIPT.DOC
< prev
next >
Wrap
Text File
|
1990-09-26
|
12KB
|
253 lines
QscrTerm Script Language Ver 1.21ß
----------------------------------
History
-------
From the early days of QscrTerm, we were asked to include a
simple script language in the QscrTerm package. After QscrTerm
became more and more popular, we decided to include a simple
beta version of the QscrTerm Script Language, so we could get
support and comments from users that would help us establish
the formal non-beta version of the Script Language
So, this version of QscrTerm includes a Script compiler and
script options, all are beta tests. We would like to remind
that the QscrTerm itself is not a beta ! Only the Script
options are.
What can a Script program do ?
-------------------------------
Well, this beta release of the Script Language is a bit
limited. Still, you will be able to write programs that
automatically log on to your BBS, poll mail, go threw the
menus and more. All this is made using few simple commands.
A Script Language is just like every other language, we put
the commands, and the user makes the best of them !
How to use it.
---------------
The Script Language includes a Script compiler called
QscrScom. In order to write a Script program, you may use
every editor you like, on one condition - it can produce pure
ascii files. After you have your pure ascii file program, run
the QscrScom with the file name in the command line.
All source files of the Script Language must have the file
extension SOR ( source ). When running the compiler, you must
only write the file name, the SOR extension would be automatically
assumed. After compiling the file, if no errors were detected,
a file with the same name, but the extension COD ( code ) would
be generated. This file is the file QscrTerm may run.
Running A Script program.
--------------------------
In the QscrCfg, the configuration file, there is a parameter
regarding the path of the script programs. This parameter should
be filled by know, and the path written should contain all the
script programs you may wish to run.
Once having the path set, just run QscrTerm. From within the
terminal press F9 ( Run Script hotkey ), or choose "Run Script"
from within the Main Menu. You'll be asked for the script name
to run. Type the script program name ( remember, it must resides
in the path you write in the configuration file, and it you should
not enter the file extension, it is automatically *.COD ), and
that is it ! From now on, the script is running. Notice that when
the script is running, you are still able to send keys to the
modem, thus interfiring the script ( or helping it... ). To end
the script program, you can wait till it is finished, or just hit
F9 again. If hitting F9 while a script is running, you'll be asked
if you want to terminate it or to continue from where it was stopped.
Auto Logon.
-----------
QscrTerm offers a very flexible LogOn mechanism. That is, you
can specify to each BBS in the dialing directory, a script file
to run when you have "CONNECT".
In the Dialing Dir, fill all the BBSes you like to call. In the
LogOn Script field, enter the script to run when the BBS answers.
Remember, write only the script filename, no extension, no path
( like when hitting F9, remember ? ). Now, when you call a BBS,
and the QscrTerm receives a "CONNECT" signle from the modem, it
would automatically run the script for that BBS. This way, you
can have a script logon automatically for you, write your name,
password and much much more !
Commands Summary.
-----------------
Till now we talked about the general idea of scripts, and the
way to use them. Now we would go over the various commands available
in the QscrTerm Script Language. When writing a script program, each
command should be placed in a new line, with its parameters. ( commands
are not case sensitive ).
Lets begin:
WAITFORMYNAME - This command would make the script program wait
till the user name is received threw the modem. The name is taken
from the configuration file. For example, if you wish to wait till
your name is sent, and then do something, use this command !
WAITFORSTRING <string> - This command is a more flexible way to wait
for any string received from the modem. You could use this command
and wait for your name, by writing your name in the parameter field.
The string the program is waiting for, can be case sensitive or not.
This is determined according to the Case Sensitive flag. The default
mode is FALSE, meaning case is not sensitive, but by using a command
detailed in a minute, you could safely set this flag as wished.
For example, if you want to wait till the string "password" is
received, just write the command:
WAITFORSTRING password
SENDMYNAME - This command would just send your name threw the modem.
Again, the name is taken from the configuration file.
SENDSTRING <string> - This command is more flexible from the above.
Using it, you can just send any string threw the modem. For example,
if you wish to send the string "hello there", just write the following
command:
SENDSTRING hello there
SKIPBYTES <number> - This command would make the program wait till
the specified number of chars/bytes are received threw the modem. It
can be usefull as a delay, or just for anything else. For example, to
wait till 11 bytes are sent, just type:
SKIPBYTES 11
DELAY <number> - This command would make the program delay the
specified number of clock ticks. For example, to make the program
wait half a second, just type:
DELAY 10 { 10*18=480 ~ 500 }
SENDMYPASSWORD - This command sends the user's password threw the
modem. This is equivalent to hitting Alt-W from the terminal, it
sends the password taken from the dialing directory record of the
BBS connected to.
WAITFORSILENCE - This command would just wait till nothing is
received from the modem. It is very usefull if your host can not
be sent any information while it is sending you, this command would
wait till no transfer is made threw the modem. After this command
you can be sure the host is ready to get your transfer with no
problems. For example, if you wish to wait till the hose is not sending
any info, and only then send you name to him, write the two commands:
WAITFORSILENCE
SENDMYNAME
CASEOFF - This command would make all comparisons not case sensitive.
All the WAIT... commands would ignore case when comparing the string
entered to the string received from the modem.
CASEON - This would make all comparisons case sensitive, meaning that
all the WAIT... commands would not ignore case when comparing the
string entered to the string received from the modem.
SENDCHAR# <number> - This command would send one char/byte that his
ascii is specified as the number. For example, to send the <ESC> char
to the modem ( its ascii code is 27 ), write the command:
SENDCHAR# 27
AUTOTRANSFERON - This command would turn the AutoTransfer flag to ON.
This is good for example if you are writing a script that envolves
files transfers. You can set autotransfer to on, and sit safe knowing
that the transfer would be automatically made.
AUTOTRANSFEROFF - This would set the auto transfer flag to false, no
file transfers would start automatically.
PROTOCOL <name> - The PROTOCOL command chooses the protocol to use in
the next file transfer. Notice that the protocol name is not case
sensitive.
UPLOAD <string> - This command would start an upload, using the string
as the parameters ( file names etc ), using the protocol chosen using
then PROTOCOL command.
DOWNLOAD <string> - Same us UPLOAD, but download using the PROTOCOL
chosen and the string as the command line ( maybe an empty string ).
HITENTER - This command just sends the <Enter> ascii code, #13, to
the modem, merely immitating an <Enter> pressing.
ASCIIUPLOAD <file name> - This command starts an ascii upload, using
the file name specified. The file specified would be ascii uplaoded.
Loops.
-------
Version 1.21ß of the Quick Screens Scripts, will only provide simple
loop commands. In fact, the two loop commands are very simple and
straight ahead. The two commands are written as follows:
LOOPUNTIL <string>
. . .
. . .
. . .
<any commands here to be looped>
. . .
. . .
. . .
ENDLOOP
The commands between the two loop commands, are the commands to be
executed until the string written in the LOOPUNTIL command is
received. Note, that nested loops are not supported in this version.
For example, to make a loop that sends the string "GO AWAY" until
the string "GONE" is received, type the following sequence:
LOOPUNTIL gone
sendstring go away
ENDLOOP
An example.
-----------
Till here all the commands. Now, lets end with a simple example
of a script program that automatically logs on to your host BBS.
The program should send two <ESC> keys in order to make FrontDoor
run the BBS. Then it should wait to the string "name:" and send your
name, and to the string "password:" and send your password. The
prorgam is very simple and readable, here it is:
SENDCHAR# 27
SENDCHAR# 27
WAITFORSTRING name:
SENDMYNAME
WAITFORSTRING password:
SENDMYPASSWORD
That is it ! Nothing to it, ha ?
Future.
-------
As already mentioned, this is just a beta release of the Script
Language. We are waiting for suggestions and comments, so we can
improve the language much more, and make it have all the options
users are waiting for !
So, please send as any comment whatsoever - Our addresses are
available in the QscrTerm docs, and in the terminal.